package cn.caojun.auth.mapper;

import cn.caojun.auth.domain.Role;
import cn.caojun.auth.dto.RolePermissionDTO;
import cn.caojun.auth.query.RoleQuery;
import cn.caojun.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {


    void deletePermissionById(Long id);

    void addRolePermission(@Param("roleId")Long roleId, @Param("permissionSns")List<String> permissionSns);

    List<String> loadPermissionById(Long roleId);

    List<String> loadMenuById(Long roleId);

    void deleteMenuById(Long roleId);

    void addRoleMenu(@Param("roleId")Long roleId, @Param("menuId")List<Long> menuId);
    //可以传入多个参数但需要加@Param("roleId")Long roleId, List<String> permissions
}
